<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="utf-8">
    <title>添加问题</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" th:href="@{/js/layui/css/layui.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/css/public.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/js/page/index/jqueryui/jquery-ui.css}"/>
    <link rel="stylesheet" th:href="@{/css/learningAnalysis/addLearningAnalysis.css}"/>
    <link rel="stylesheet" th:href="@{/css/knowledgeBase/selectStyle.css}"/>
    <style>

        .layui-layer-page .layui-layer-content {
            overflow: visible;
        !important;
        }

        .layui-col-space10 {
            margin: 0px
        }

    </style>

</head>


<body class="childrenBody" >
<div id="addDiv">

    <form class="layui-form layui-row layui-col-space10" style="padding: 5px 5px;" id="addKnowledgeBaseForm">
        <!--问题分析的ID-->
        <input type="hidden" name="qid" id="questionBaseId"/>
        <div class="houselabel">
            <div class="layui-form-item"  id="swithQuestion">
                <label class="layui-form-label">切换到</label>
                <div class="layui-input-block">
                    <select lay-verify="" id="quesetionType" lay-filter="quesetionType">
                        <option value="1" id="addKnowledgeBase">添加问题</option>
                        <option value="0" id="editKnowledgeBase">编辑已有问题</option>
                    </select>
                </div>
            </div>
            <!--选择需要修改的问题-->
            <div class="layui-form-item" id="selectKnowledgeBase" style="display:none;margin-top: 4%">
                <label class="layui-form-label">选择问题:</label>
                <div class="layui-input-block">
                    <input id="chooseKnowledgeBaseId" type="hidden" name="id">
                    <input id="chooseKnowledgeText" type="text" class="layui-input "
                           placeholder="输入问题关键字搜索并选择">
                </div>
            </div>
            <div id="needSelect">
                <div class="layui-form-item" style="text-align: left;">
                    <label class="layui-form-label">类型:</label>
                    <div class="layui-input-block">
                        <input type="radio" name="knowledgeType" value="COMMON" title="一般问题 " checked id="common"  />
                        <input type="radio" name="knowledgeType" value="BUSINESS" title="业务问题" id="business"/>

                    </div>
                    <span id="describe">与业务场景无关的问题,如：您贵姓</span>
                </div>
                <!--当前话术包Id-->
                <input id="packageId" type="hidden" name="packageId" >
                <!--原所属话术包名称一-->
                <div class="layui-form-item" id="packageDiv" >
                    <label class="layui-form-label">原话术包:</label>
                    <div class="layui-input-block">
                        <input id="packageText" type="text" class="layui-input " readonly>
                        <input id=" originalPackageId" type="hidden"  >
                    </div>
                </div>
                <div class="layui-form-item" id="titleDiv">
                    <label class="layui-form-label">标题:</label>
                    <div class="layui-input-block">
                        <input id="title" type="text" name="title" class="layui-input newsName"
                               lay-verify="required|title|alreadyExisted"
                               placeholder="请概括问题场景，如：客户询问利息">
                        <input type="hidden" id="originalTitle">
                    </div>
                </div>
                <div class="layui-form-item" id="correctionDiv">
                    <label class="layui-form-label">反馈意图:</label>
                    <div class="layui-input-block">
                        <input id="correction" type="text" name="correction" class="layui-input" readonly>
                    </div>
                </div>
                <div class="layui-form-item" id="keywordItem">
                    <label class="layui-form-label">关键词:</label>
                    <div class="layui-input-block" id="keywordBox">
                        <input type="text" class="layui-input newsName" lay-verify="newsName" placeholder="请输入关键词,按回车结束"
                               id="addKeyword">
                        <input id="needKeywords" name="keyworlds" type="hidden"/>
                        <div id="keywordDiv"><span id="keywordColor">匹配到该分支的关键词</span></div>

                    </div>

                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">问法:</label>
                    <div class="layui-input-block">
                    <textarea id="questions" required lay-verify="required|textarea" placeholder="请输入问题多种问法，并回车分割"
                              class="layui-textarea" name="howAskQuestions"></textarea>
                        <input id="howAskQuestions" type="hidden"/>
                        <div>
                            <input type="button" class="layui-btn layui-btn-xs layui-bg-gray" value="自动分词"
                                   id="autoAnalysis"/>
                        </div>
                    </div>
                </div>


                <div class="layui-form-item" style="text-align: left;margin-bottom: 0px;" id="answerBox">
                    <label class="layui-form-label">回答方式:</label>
                    <div class="layui-input-block">
                        <input id="oneToOne" type="radio" name="answerType" lay-filter="radioAnswerType"
                               value="ONE_TO_ONE"
                               checked title="单句问答">
                        <input id="mutiSession" type="radio" name="answerType" lay-filter="radioAnswerType"
                               value="MUTI_SESSION" title="进入多轮会话"
                        >
                        <div id="oneToOneanswerDiv"><a href="javascript:void(0)" id="oneToOneanswer" onclick="addAnswer()"><span id="oneToOneanswerSpan">+&nbsp;标准答案</span></a></div>

                    </div>

                </div>

                <div class="layui-form-item " id="answerAfter" style="display: none">
                    <label class="layui-form-label">答后操作:</label>
                    <div class="layui-input-block">
                        <select name="afterAnswerOptionalType" lay-verify="" lay-filter="answerOperation"
                                id="answerOperation">
                           <!-- <option value="">请选择操作类型(必选)</option>-->
                            <option value="STOP">挂机</option>
                            <!--<option value="WAIT_CUSTOMER_ANSWER" selected
                            >等待客户回答
                            </option>-->
                            <option value="ORIGIN_FLOW">跳转到原主动流程</option>
                            <option value="ASSIGN">跳转到指定主动流程</option>
                        </select>
                    </div>
                </div>
                <!--储存标准答案-->
                <input id="ontoOneText" name="oneToOneResult" type="hidden" lay-verify="mustNoNull">
                <!--单句问答历程一对一-->
                <div class="layui-form-item" id="selectAnswerType" style="display: none">
                    <label class="layui-form-label">选择流程:</label>
                    <div class="layui-input-block">
                        <input id="skipFlowId" type="hidden" name="skipFlowId">
                        <input id="skipFlowText" type="text" class="layui-input "
                               placeholder="输入流程关键字搜索并选择">
                    </div>
                </div>


                <!--<div class="layui-form-item" id="multiSelectAnswerType" style="display: none">
                    <label class="layui-form-label">选择流程</label>
                    <div class="layui-input-block ">
                        <select name="mutiSessionFlowId" lay-verify="" lay-search id="mutiSessionFlowId">
                            <option value="">可以输入内容进行筛选</option>
                        </select>
                    </div>
                </div>-->
                <!--多轮会话问答历程一-->
                <div class="layui-form-item" id="multiSelectAnswerType" style="display: none">
                    <label class="layui-form-label">选择流程:</label>
                    <div class="layui-input-block">
                        <input id="mutiSessionFlowId" type="hidden" name="mutiSessionFlowId">
                        <input id="mutiSessionText" type="text" class="layui-input "
                               placeholder="输入流程关键字搜索并选择">
                    </div>
                </div>


                <!--<div  id="selectAnswerType" th:if="${editKnowledgeBase.answerType.value eq 'm'}?class='layui-form-item':class='layui-form-item displaynoneClass'" >-->

                <!--<div class="layui-form-item">
                    <label class="layui-form-label">其他设置:</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input newsName" lay-verify="newsName" placeholder="请输入话术名称">
                    </div>
                </div>-->
                <div style="display: none"
                     id="myButton">
                    <!--                <button type="button" class="layui-btn layui-btn-primary"
                                            style="width: 100px;margin-left: 47%;margin-top: 7px;background-color: #b2b2b2;"
                                            id="closeUpdateWindow">
                                        取消
                                    </button>-->
                    <button type="button" class="layui-btn" lay-submit lay-filter="addKnowledgeBase"
                            style="width: 100px;margin-left: 35px;margin-top: 7px;">
                        保存
                    </button>
                </div>
            </div>
        </div>
    </form>
</div>

</div>

<!--自动分词-->
<div id="selectKeyword" style="display: none">

    <select multiple="multiple"  id="autoKeywords">

    </select>


    <div  class="btn-bar" style="display: inline-block; position: absolute">
        <p><span><input type="button" value=">" class="btn" id="moveToRight" ></span></p>
        <p><span><input type="button" value="<" class="btn" id="moveToLeft" ></span></p>
        <p><span><input type="button" value=">>" class="btn" id="moveAllToRight" ></span></p>
        <p><span><input type="button" value="<<" class="btn" id="moveAllToLeft" ></span></p>
    </div>

    <select multiple="multiple"  id="addKeywords">

    </select>

</div>

<script type="text/javascript" th:src="@{/js/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/js/jquery-1.7.2.min.js}"></script>
<script type="text/javascript" th:src="@{/js/page/index/jqueryui/jquery-ui.js}"></script>
<script type="text/javascript" th:src="@{/js/page/learningAnalysis/addLearningAnalysis.js(v=${new java.util.Date().getTime()})}"></script>
<script type="text/javascript"   th:src="@{/js/page/utils.js}"></script>

</body>


</html>










